package com.tron.thread;

import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;

public class ExecutorsStart {
    public static void main(String[] args) {
        final ThreadFactory threadFactory = Executors.defaultThreadFactory();
        threadFactory.newThread(new PrintRunnable("-")).start();
        threadFactory.newThread(new PrintRunnable("_")).start();
    }

    public static class PrintRunnable implements Runnable {
        private String message;
        PrintRunnable(String message) {
            this.message = message;
        }
        @Override
        public void run() {
            System.out.print(message);
        }
    }
}
